package main

import "fmt"
// common.js require + module.exports
// es6 import + export default
// type 自定义类型 class 关键字
type Books struct {
	title string
	author string
	subject string
	book_id int

}
func main() {
	// fmt.Println(Books{"Go语言","google","现代C",123})
	// fmt.Println(Books{title: "GO语言",author: "google",subject: "现代C",book_id: 123465})
	// fmt.Println(Books{title: "GO语言",author: "google"})
	var Book1 Books
	var Book2 Books

	Book1.title = "GO语言"
	Book1.author = "google"
	Book1.subject = "现代C"
	Book1.book_id = 123456

	Book2.title = "Python"
	Book2.author = "龟叔"
	Book2.subject = "AI语言"
	Book2.book_id = 333342

	fmt.Printf("title: %s\n",Book2.title)
	fmt.Printf("author: %s\n",Book2.author)
	fmt.Printf("subject: %s\n",Book2.subject)
	fmt.Printf("book_id: %d",Book2.book_id)
}